1. Field of the Invention
This present invention relates to a picture data encoding apparatus for transmitting the encoded data by adjusting the transfer rate of the encoded data according to the bit rate of the receiver media. Here, the concept of the media in the present invention includes a data carrier such as a storage media and network.
2. Description of the Related Art
Recently, a digital storage system and storage media such as DVD (digital video disc) has been developed and available in practical use. Such storage system and media can store more than 120 minutes of picture image data onto a laser disc whose size is the same as that of the conventional CD-ROM with the same quality level of S-VHS standard accomplished by the improvement of the available density and massive volume of the storage media and by developing of the digital moving picture compression technology such as MPEG 2 (Moving Picture Experts Group 2). Moreover, for the storage media in which random access is available such as DVD, reproduction (data copy) is easier than in magnetic tape storage media. Therefore, it is greatly excellent in the mass production ability for the software products.
On the other hand, the progress of the digital technology achieves great progress in the broadcasting field. In a part of broadcasting media, data distribution applying digital moving picture compression technologies such as MPEG 2 enters in a practical use stage, and it is thought that DVD will be used for a video server of the broadcasting station in the future. In general, a fixed rate transmission is applied to broadcasting data transmission because it is necessary to achieve economical operation in the transmission line by reducing the transfer rate per a channel as much as possible. Encoding rule used in MPEC, a predetermined constant bit amount is assigned to each I picture (Intraframe picture hereinafter referred to as xe2x80x9cI picturexe2x80x9d), P picture (Predictive picture. hereinafter referred to as xe2x80x9cP picturexe2x80x9d), B picture (Bidirectionally Predictive picture hereinafter referred to as xe2x80x9cB picturexe2x80x9d) as a target bit amount respectively by applying the fixed rate encoding, and rate control is performed for closing each encoding bit amount to the corresponding target bit amount asymptotically.
On the other hand, the variable rate encoding technology is used in a digital storage media such as DVD. The variable rate encoding achieves the high quality encoding with efficient data compression by assigning a large amount of bits to the complex picture with a dynamic movement of the object between frames and a small amount of the bits to the simple picture with a static movement.
When transmitting the data on the storage media such as DVD which employs the variable rate encoding technology by utilizing a transmission media of fixed rate, the correspondence might not be able to be maintained. In the conventional technology, the encoded data with a variable rate is re-encoded with a fixed rate in advance before the data transmission. In other word, one method for performing above mentioned transmission is that the data encoded with variable rate stored in the DVD should be decoded once, then those decoded picture data are re-encoded with fixed rate again by the digital motion picture compression apparatus. After those decoding and re-encoding processing, those modified data can be transmitted through the fixed rate transmission line.
Also in the conventional technology, when transmitting and recording the encoded data from the media for high bit rate to the media for low bit rate, the encoded data also should be decoded once, then those decoded picture data are re-encoded with low bit rate for receiver again by the digital motion picture compression apparatus and those modified data are transmitted to the receiver media.
As shown above, according to the above mentioned conventional technology, the following additional apparatuses will be necessary. One is a coded picture data decoding apparatus for decoding the encoding data stored on the sender media once. The other apparatus is a picture data re-encoding apparatus for encoding those decoded picture data with the bit rate employed in a receiver media (designation media).
As a result, there are problems in the conventional technology that the manufacturing cost is boosted up and the additional processing steps are increased.
Therefore, with the foregoing in mind, it is an object of the present invention to provide a picture data encoding apparatus for transmitting data by converting the encoded data with variable rate to the encoded data with fixed rate without employing the re-encoding method.
Another object of the present invention is to provide a picture data encoding apparatus for transmitting encoded data between two media which are different in bit rate by reducing and adjusting the bit rate within the bit rate for the receiver media without employing the re-encoding method.
In order to achieve above mentioned objects, the picture data encoding apparatus of the present invention includes a target bit amount determined means for calculating a target bit amount for each block according to the bit rate and the number of blocks to be converted. In addition, a bit amount adjusting means is included. The bit amount adjusting means counts the amount of the bit stream, adds the end of block (hereinafter referred to as xe2x80x9cEOBxe2x80x9d) code which indicates the end of the block into the block data when the counted amount of the bit stream reaches the target bit amount and deletes the encoding data following the added EOB code.
By this embodiment, the picture data encoding apparatus can perform bit amount adjustment for each block by the bit amount adjusting means by utilizing the EOB. The picture data encoding apparatus can adjust the transfer bit rate of the encoded data to the bit rate for the receiver media by adjusting the bit amount for each block by simple system configuration without decoding the code.
Next, in another embodiment, the picture data encoding apparatus includes a target bit amount determined means for calculating a target bit amount for each macro block according to the bit rate and the number of macro blocks to be converted. In addition, another bit amount adjusting means is included. The bit amount adjusting means counts the amount of the bit stream, modifies the code block pattern (hereinafter referred to as xe2x80x9cCBPxe2x80x9d) which shows the macro block information when the counted amount of the bit stream reaches the target bit amount, and deletes the encoded data of the macro block whose CBP has been modified.
By this embodiment, the picture data encoding apparatus can perform bit amount adjustment for each macro block by the bit amount adjusting means by modifying CBP. The picture data encoding apparatus adjusts the transfer bit rate of the encoded data to the bit rate for the receiver media by adjusting the bit amount for each macro block by simple system configuration without decoding the code.
Next, in another embodiment, the picture data encoding apparatus includes a target bit amount determined means for calculating a target bit amount for each block according to the bit rate and the number of blocks to be converted. In addition, another bit amount adjusting means is included. The bit amount adjusting means reduces the bit amount for each block to the target bit amount by means of reducing the bit amount assigned for each code by converting the run level information for each code into lower run level information.
By this embodiment, the picture data encoding apparatus can perform bit amount adjustment for each block by the bit amount adjusting means by reducing the run level information. The picture data encoding apparatus adjusts the transfer bit rate of the encoded data to the bit rate for the receiver media by adjusting the bit amount for block by simple system configuration without decoding the code.
Next, in another embodiment, the picture data encoding apparatus includes a target bit amount determined means for calculating a target bit amount for each macro block according to the bit rate and the number of macro blocks to be converted. In addition, another bit amount adjusting means is included. The bit amount adjusting means reduces the bit amount for each macro block to the target bit amount by means of reducing the bit amount for each code by converting the run level information for each code into lower run level information.
By this embodiment, the picture data encoding apparatus can perform bit amount adjustment for each macro block by the bit amount adjusting means by reducing the run level information. The picture data encoding apparatus adjusts the transfer bit rate of the encoded data to the bit rate for the receiver media by adjusting the bit amount for each macro block by simple system configuration without decoding the code.
The bit amount adjustment means preferably performs the bit amount adjustment only to the code in the vicinity of the end of block code.
By this embodiment, the picture data encoding apparatus can keep the picture quality high by applying bit amount adjustment process only to the code located in the vicinity of the EOB code which becomes a high frequency component according to the character of DCT coefficient.
Next, the bit amount can be reduced by repeating the processing of the bit amount adjustment means.
By this embodiment, in case that the target bit rate adjustment can not be achieved by one time bit adjustment processing for each code, the target bit rate can be achieved surely by performing the bit adjustment processing several times until the target bit rate is achieved.
Next, the target bit amount determination means calculates the target bit amount for the B picture in order to achieve the bit amount rate conversion only by reducing the bit amount of the B picture without reducing the bit amount of the I picture and the P picture. The bit amount adjustment means reduces only the bit amount of the B picture according to the calculated target bit amount for the B picture.
By this embodiment, because the I picture data and the P picture data are invariable, deterioration in the picture quality can be suppressed.
Next, when the bit rate is a fixed rate, and the bit rate for the receiver media is higher than the bit rate for sender media, the bit amount adjustment means adjusts and transfers the data by converting the variable rate encoded data into the fixed rate encoded data by adding the dummy data.
By this embodiment, data can be transmitted by converting the variable rate encoded data into the fixed rate encoded data for the receiver media.
These and other advantages of the present invention will become apparent to those skilled in the art upon reading and understanding the following detailed description with reference to the accompanying figures.